Ext.define('Admin.view.employee.EmployeeSearchForm', {
    extend: 'Ext.form.Panel',
    xtype:'employeeSearchForm',
    requires: [
        'Ext.button.Button',
        'Ext.form.*'
    ],
    style: 'margin:10px',
    width:600,
    height:800,
    controller: 'employeeViewController',
    defaults: {
        labelWidth: 60,
        labelSeparator: ''
    },
    items:[
            {
              xtype: 'textfield',           
              name: 'empName',
              fieldLabel: '姓名',
              reference: 'employeeSearchEmpName'
          },{
               xtype:'radiogroup',
               fieldLabel: '性别',
                style: 'padding-top:3px;height:17px;',

                items: [{ name: 'sex', inputValue: 'male', boxLabel: '男'}, { name: 'sex', inputValue: 'female', boxLabel: '女'}],
                reference: 'employeeSearchSex'
           },{
              xtype:'combobox',
             
              fieldLabel: '部门',
              store:{
                         proxy: {
                         type: 'ajax',
                          url:'part/findAll',
                           reader: {
                          type: 'json',
                          rootProperty: 'lists'
                          }
                        },
                         fields: [ 'partId', 'partName']
                      },
              displayField: 'partName',
              valueField: 'partId',
              name:'partId',
              emptyText: '请选择...',
              blankText: '请选择部门',
              Addable: false,
              mode: 'local' ,
              reference: 'employeeSearchPart'
     },{ 
        xtype:'combobox',
            
              fieldLabel: '岗位',
              store:{
                         proxy: {
                         type: 'ajax',
                          url:'post/findAll',
                           reader: {
                          type: 'json',
                          rootProperty: 'lists'
                          }
                        },
                         fields: [ 'postId', 'postName']
                      },
              displayField: 'postName',
              valueField: 'postId',
              name:'postId',
              emptyText: '请选择...',
              blankText: '请选择岗位',
              Addable: false,
              mode: 'local' ,
              reference: 'employeeSearchPost'
          },{
             xtype: 'textfield',     
             name: 'education',
             fieldLabel: '学历' ,
             reference: 'employeeSearchEducation'      
         },{
             xtype: 'textfield',     
             name: 'political',
             fieldLabel: '政治面貌',
             reference: 'employeeSearchPolitical'        
         },{
        xtype: 'datefield',
        fieldLabel: '入职时间(<=)',
        name:'joinTime',
        format: 'Y/m/d',
        reference: 'employeeSearchJoinTime'
     }
                       
                     
        ],

        buttons: [{
            text: 'submit',
            handler:'moreSearch'
        },{
            text: 'Cancel',
            handler :function(bt){
            var win = bt.up('window');
            if (win) {
                win.close();
            }
          }
        }]
    
});